%*******************************************************************************
%	
%	Copyright (c) 2009 Philip Wenig
%
%	Unless otherwise specified, this work is licensed under a 
%	Creative Commons Attribution-Share Alike 3.0 License.
%
%	http://creativecommons.org/licenses/by-sa/3.0/
%
%	Contributors:
%		Philip Wenig
%
%*******************************************************************************

%---------------------------------------------------------------
%
%	SPECIAL
%
%---------------------------------------------------------------
\chapter{Special}
	\label{sec:Special}
		%
		%	INDICES
		%
		\index{xxx}
		\index{xxx!yyy}		
		%
		%	CONTENT
		%
		This is the special part.


%---------------------------------------------------------------
%	FORMULA
%---------------------------------------------------------------
	\section{Formula}
		\label{sec:Formula}
			%
			%	INDICES
			%
			\index{xxx}
			\index{xxx!yyy}		
			%
			%	CONTENT
			%
			Formulas: \(\beta = \Theta * \tau\)

			\VERTICALSPACE
							
				\begin{equation}
					\beta = \Theta * \tau
					\label{eq:FirstEquation}
				\end{equation}

			\VERTICALSPACE
					
			Formulas can also contain an mbox element.

			Formulas: \[ \beta = \Theta ~\mbox{and some text} * \tau \]
		
			\VERTICALSPACE

				\begin{equation}
					\beta = \Theta ~\mbox{and some text} * \tau
					\label{eq:SecondEquation}
				\end{equation}

%---------------------------------------------------------------
%	FORMULA
%---------------------------------------------------------------
	\section{Chemical Formula}
		\label{sec:ChemicalFormula}
			%
			%	INDICES
			%
			\index{xxx}
			\index{xxx!yyy}		
			%
			%	CONTENT
			%
			$\ce{H2O}$ can be written and $\ce{Ce^{IV}}$

%---------------------------------------------------------------
%	TABLES
%---------------------------------------------------------------
	\section{Tabels}
		 \label{sec:Tables}
			%
			%	INDICES
			%
			\index{xxx}
			\index{xxx!general}		
			%
			%	CONTENT
			%
			How to use tables.

				\begin{table}[htbp]
					\centering
					%
					%	CAPTION AND LABEL
					%
					\caption[table1 short]{table1 long}
					\label{tab:table1}
					\VERTICALSPACE
					%
					%	EXTRA ROW HEIGHT
					%
					\setlength\extrarowheight{4pt}
					%
					%	CONTENT
					%	
					\begin{tabular}{cccc}
						1 & 2  & 3 & 4 \\ 
						5 & 6 & 7 & 8 \\ 
					\end{tabular}
				\end{table}


%---------------------------------------------------------------
%	TABULARX
%---------------------------------------------------------------
		\subsection{Tabularx}
		 	\label{sec:Tabularx}
				%
				%	INDICES
				%
				\index{xxx}
				\index{xxx!general}		
				%
				%	CONTENT
				%
				How to use tables.

					\begin{table}[hbt]	
						\centering
						%
						%	CAPTION AND LABEL
						%
						\caption[Tabular X]{Full description of tabular x.}
						\label{tab:TabularX}
						\VERTICALSPACE	
						%
						%	EXTRA ROW HEIGHT
						%
						\setlength\extrarowheight{4pt}
						%
						%	CONTENT
						%				
						\begin{tabularx}{\linewidth}{XXX}
							Hello & World & ! \\				
						\end{tabularx}
					
					\end{table}

%---------------------------------------------------------------
%	TABULARY
%---------------------------------------------------------------
		\subsection{Tabulary}
		 	\label{sec:Tabulary}
				%
				%	INDICES
				%
				\index{xxx}
				\index{xxx!general}		
				%
				%	CONTENT
				%
				How to use tables.

					\begin{table}[hbt]
						\centering
						%
						%	CAPTION AND LABEL
						%
						\caption[Tabular Y]{Full description of tabular y.}
						\label{tab:TabularY}
						\VERTICALSPACE
						%
						%	COLUMN MIN AND MAX WIDTH AND EXTRA ROW HEIGHT
						%
						\setlength\tymin{10pt}
						\setlength\tymax{0.7\linewidth}
						\setlength\extrarowheight{4pt}
						%
						%	CONTENT
						%
						\begin{tabulary}{\linewidth}{c!{\extracolsep{\fill}}cc}
							1 & 2 & 3 \\
						\end{tabulary}
					\end{table}


%---------------------------------------------------------------
%	TABULARY MULTIROW MULTICOLUMN
%---------------------------------------------------------------
		\subsection{Tabulary Multirow Multicolumn}
		 	\label{sec:TabularyMulti}
				%
				%	INDICES
				%
				\index{xxx}
				\index{xxx!general}		
				%
				%	CONTENT
				%
				How to use tables.

					\begin{table}[hbt]
						\centering
						%
						%	CAPTION AND LABEL
						%
						\caption[Tabular Y Multi]{Full description of tabular y multi.}
						\label{tab:TabularYMulti}
						\VERTICALSPACE
						%
						%	COLUMN MIN AND MAX WIDTH AND EXTRA ROW HEIGHT
						%
						\setlength\tymin{10pt}
						\setlength\tymax{0.7\linewidth}
						\setlength\extrarowheight{4pt}
						%
						%	CONTENT
						%
						\begin{tabulary}{\linewidth}{c!{\extracolsep{\fill}}cccc}
							\tline
							1 & 2 & 3 & 4 & 5 \\
							\multicolumn{2}{c}{6 + 7} & 8 & 9 & 10 \\
							\multirow{2}{3mm}{11 + 16} & 12 & 13 & 14 & 15 \\
							& 17 & 18 & 19 & 20 \\
							\\
							\bline
						\end{tabulary}
					\end{table}


\startLandscape
%---------------------------------------------------------------
%	TABULARY IN LANDSCAPE FORMAT
%---------------------------------------------------------------
		\subsection{Tabulary in Landscape Format}
		 	\label{sec:TabularyLandscape}
				%
				%	INDICES
				%
				\index{xxx}
				\index{xxx!general}		
				%
				%	CONTENT
				%
				How to use tables in landscape format.

					\begin{table}[hbt]
						\centering
						%
						%	CAPTION AND LABEL
						%
						\caption[Tabular Y Landscape]{Full description of tabular y landscape.}
						\label{tab:TabularYLandscape}
						\VERTICALSPACE
						%
						%	COLUMN MIN AND MAX WIDTH AND EXTRA ROW HEIGHT
						%
						\setlength\tymin{10pt}
						\setlength\tymax{0.7\linewidth}
						\setlength\extrarowheight{4pt}
						%
						%	CONTENT
						%
						\begin{tabulary}{\linewidth}{c!{\extracolsep{\fill}}cccc}
							0.91613106 & 0.222004837 & 0.890561805 & 0.173857916 & 0.619271519 \\
							0.134750182 & 0.341511308 & 0.616311652 & 0.335835447 & 0.911508131 \\
							0.429437911 & 0.184793685 & 0.361233213 & 0.612350457 & 0.865330728 \\
							0.759366135 & 0.455936746 & 0.48756498 & 0.547046289 & 0.583239345 \\
							0.926166135 & 0.839138263 & 0.569524339 & 0.891585576 & 0.352813031 \\
							0.199598234 & 0.944102636 & 0.198215271 & 0.590633623 & 0.253849074 \\
							0.665795694 & 0.819213879 & 0.659733651 & 0.415803726 & 0.383570698 \\
							0.72725846 & 0.005063552 & 0.186585226 & 0.542591626 & 0.769664386 \\
							0.619364568 & 0.822076887 & 0.390509538 & 0.781145682 & 0.475755565 \\
							0.672865646 & 0.628382514 & 0.656328332 & 0.189932042 & 0.301968846 \\
							0.306308547 & 0.71794792 & 0.462711808 & 0.181623775 & 0.145905856 \\
							0.590004622 & 0.439324779 & 0.924967433 & 0.124017114 & 0.708726006 \\
							0.38261163 & 0.199716689 & 0.888160635 & 0.12902971 & 0.28438149 \\
						\end{tabulary}
					\end{table}

\stopLandscape

%---------------------------------------------------------------
%	SUPERTABULAR (DOESN'T WORK WITH tex4ht!!)
%---------------------------------------------------------------
		\subsection{Supertabular}
		 	\label{sec:Supertabular}
				%
				%	INDICES
				%
				\index{xxx}
				\index{xxx!general}		
				%
				%	CONTENT
				%
				How to use tables with more than one page.

					%
					% It's not possible to convert long tables to *.odt (*.doc) via tex4ht.
					% So use ifpdf, that the table will only be shown if the document will be compiled as a pdf.
					% Otherwise show the text at the end of the ifpdf statement.
					%
					%	\ifpdf
					%		table
					%	\else
					%		statement for *.odt and *.doc files.
					%	\fi
					%
					\ifpdf
						%
						%	SUPERTABULAR CAPTION AND LABEL
						%
						\captionof{table}[Supertabular]{Description of supertabular}
						\label{tab:Supertabular}
						\VERTICALSPACE
						%
						%	TABLE HEAD AND TAIL
						%
						\tablefirsthead{%
							1 - First &% 
							1 - Second &%
							1 - Third \\%
						}
	
						\tablehead{%
							n - First &% 
							n - Second &%
							n - Third \\%
						}
	
						\tabletail{\multicolumn{3}{r}{\emph{... proceed on next page}} \\}%
						\tablelasttail{ \\}%
						%
						%	CONTENT
						%
						\begin{supertabular}{%
							>{\raggedright\hspace{0pt}\arraybackslash}p{122pt}% 
							>{\raggedleft\hspace{0pt}\arraybackslash}p{100pt}%
							>{\centering\hspace{0pt}\arraybackslash}p{150pt}%
						}
							
							1 & 2 & 3 \\
							2 & 3 & 4 \\
							3 & 4 & 5 \\
							4 & 5 & 6 \\
							5 & 6 & 7 \\
							6 & 7 & 8 \\
							7 & 8 & 9 \\
							8 & 9 & 10 \\
							9 & 10 & 11 \\
							10 & 11 & 12 \\
							11 & 12 & 13 \\
							12 & 13 & 14 \\
							13 & 14 & 15 \\
							14 & 15 & 16 \\
							15 & 16 & 17 \\
							16 & 17 & 18 \\
							17 & 18 & 19 \\
							18 & 19 & 20 \\
							19 & 20 & 21 \\
							20 & 21 & 22 \\
							21 & 22 & 23 \\
							22 & 23 & 24 \\
							23 & 24 & 25 \\
							24 & 25 & 26 \\
							25 & 26 & 27 \\
							26 & 27 & 28 \\
							27 & 28 & 29 \\
							28 & 29 & 30 \\
							29 & 30 & 31 \\
							30 & 31 & 32 \\
							31 & 32 & 33 \\
							32 & 33 & 34 \\
							33 & 34 & 35 \\
							34 & 35 & 36 \\
							35 & 36 & 37 \\
							36 & 37 & 38 \\
							37 & 38 & 39 \\
							38 & 39 & 40 \\
							39 & 40 & 41 \\
							40 & 41 & 42 \\
							41 & 42 & 43 \\
							42 & 43 & 44 \\
							43 & 44 & 45 \\
							44 & 45 & 46 \\
							45 & 46 & 47 \\
							46 & 47 & 48 \\
							47 & 48 & 49 \\
							48 & 49 & 50 \\
							49 & 50 & 51 \\
							50 & 51 & 52 \\
							51 & 52 & 53 \\
							52 & 53 & 54 \\
							53 & 54 & 55 \\
							54 & 55 & 56 \\
							55 & 56 & 57 \\
							56 & 57 & 58 \\
							57 & 58 & 59 \\
							58 & 59 & 60 \\
							59 & 60 & 61 \\
							60 & 61 & 62 \\
							61 & 62 & 63 \\
							62 & 63 & 64 \\
							63 & 64 & 65 \\
							64 & 65 & 66 \\
							65 & 66 & 67 \\
							66 & 67 & 68 \\
							67 & 68 & 69 \\
							68 & 69 & 70 \\
							69 & 70 & 71 \\
							70 & 71 & 72 \\
							71 & 72 & 73 \\
							72 & 73 & 74 \\
							73 & 74 & 75 \\
						\end{supertabular}					
					\else
						The included table will not be shown in LaTeX > DVI mode, which is used to convert this file to a valid *.odt respectively *.doc file.
					\fi